package g2.routemaster.model;

import java.util.Dictionary;
import java.util.Properties;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;

public class ModelActivator implements BundleActivator {

	private ServiceRegistration registration;

	public void start(BundleContext context) {
		GameManager manager = new GameManager();
		ModelAdaptor gm = new ModelAdaptorImpl(manager);

		Dictionary props = new Properties();
		props.put("category", "misc");
		//TODO: ehome.ehdata.Activator
		registration = context.registerService(ModelAdaptor.class.getName(),
				gm, props);
	}

	public void stop(BundleContext context) {
		registration.unregister();
	}
}
